/**
 * Created by WYH on 17/4/17.
 */
angular.module('tribalc').factory('Enum', function () {

    var locationUrl = 'login.html#/';


    var StaffNormalLeftBarItems = [
        {
            name: '基本信息',
            url: '/tribalc-web/img/left/base.png',
            selectUrl: '/tribalc-web/img/left/base_select.png',
            jumpUrl: locationUrl + 'company/profile'
        },
        {
            name: '员工信息',
            url: '/tribalc-web/img/left/staff.png',
            selectUrl: '/tribalc-web/img/left/staff_select.png',
            jumpUrl: locationUrl + 'company/staff'
        },
        {
            name: '设备权限',
            url: '/tribalc-web/img/left/equip.png',
            selectUrl: '/tribalc-web/img/left/equip_select.png',
            jumpUrl: locationUrl + 'company/locks'
        }
    ];


    var StaffLeftBarItems = StaffNormalLeftBarItems.concat([

        {
            name: '租赁管理',
            url: '/tribalc-web/img/left/lease.png',
            selectUrl: '/tribalc-web/img/left/lease_select.png',
            jumpUrl: locationUrl + 'company/rent'
        }
        ,
        {
            name: '企业福利',
            url: '/tribalc-web/img/left/equip.png',
            selectUrl: '/tribalc-web/img/left/equip_select.png',
            jumpUrl: locationUrl + 'company/welfare'
        }

    ])

    var LocksLeftBarItems = [
        {
            name: '全部',
            url: '/tribalc-web/img/left/lock_manager.png',
            selectUrl: '/tribalc-web/img/left/lock_manager.png',
            jumpUrl: locationUrl + 'manager/locks'
        }
    ];

    var RentsLeftBarItems = [
        {
            name: '全部',
            url: '/tribalc-web/img/left/lock_manager.png',
            selectUrl: '/tribalc-web/img/left/lock_manager.png',
            jumpUrl: locationUrl + 'manager/rents'
        }
    ];
    var ApproveLeftBarItems = [
        {
            name: '全部',
            url: '/tribalc-web/img/left/lock_manager.png',
            selectUrl: '/tribalc-web/img/left/lock_manager.png',
            jumpUrl: locationUrl + 'manager/approve'
        }
    ];
    var AccountLeftBarItems = [
        {
            name: '全部',
            url: '/tribalc-web/img/left/lock_manager.png',
            selectUrl: '/tribalc-web/img/left/lock_manager.png',
            jumpUrl: locationUrl + 'account'
        }
    ];


    var NavBarNormalItems = [
        // {
        //     name: '主页'
        // },
        {
            name: '企业',
            url: locationUrl + 'company/profile'
        }
    ];

    var NavBarPropertyItems = NavBarNormalItems.concat([
        {
            name: '租赁',
            url: locationUrl + 'manager/rents'
        },
        {
            name: '设备',
            url: locationUrl + 'manager/locks'
        },

        {
          name: '认证',
            url:locationUrl + 'manager/approve'

        }
    ]);



    var StaffOptions = [
        {
            key: 'name',
            name: '姓名'
        },
        {
            key: 'idNo',
            name: '身份证号'
        },
        {
            key: 'phone',
            name: '联系电话'
        },
        {
            key: 'department',
            name: '部门'
        },
        {
            key: 'position',
            name: '职位'
        }
    ];
    var LockListTitle = [
        {
            key: 'name',
            name: '设备管理'
        },
        {
            key: 'idNo',
            name: '设备出入记录'
        },
        {
            key: 'phone',
            name: '访客权限'
        }
    ];

    var Sex = {
        "UNKNOWN": '\u672a\u77e5\u000d',  /* 未知 */
        "FEMALE": '\u5973',   /* 女 */
        "MALE":'\u7537'  /* 男 */
    };

    var SexFormat = function () {
        var sex = {};
        for (var key in Sex) {
            sex[Sex[key]] = key;
        }
        return sex;
    }();

    var BindStatus = {
        'TO_BIND': '\u672a\u7ed1\u5b9a',  /* 未绑定 */
        'BIND_ED': '\u5df2\u7ed1\u5b9a', /* 已绑定 */
        'AGENT' : '已设代理人',
    };
    var BindStatusFormat = function () {
        var status = {};
        for (var key in BindStatus) {
            status[BindStatus[key]] = key;
        }
        return status;
    }();

    var AuthenticationStatus = {
        notStart: 'NOT_START',
        processing: 'PROCESSING',
        failure: 'FAILURE',
        success: 'SUCCESS'
    };


    var companyNumberOptions = ['1-49', '50-99', '100-499', '500-999', '1000以上'];
    var companyIndustryOptions = ['电子商务', '企业服务', '文艺体育', '社交网络', '游戏', '生活服务', '互联网金融', '教育', '餐饮'];
    var companyNatureOptions = ['国营', '私营', '中外合资', '外资', '其他'];

    return {
        /* 导航栏信息 */
        NavBarNormalItems: NavBarNormalItems,
        NavBarPropertyItems: NavBarPropertyItems,

        /* 性别 */
        Sex: Sex,
        SexFormat: SexFormat,

        /* 员工筛选选项 */
        StaffOptions: StaffOptions,
        /* 物业公司企业侧栏选项 */
        StaffNormalLeftBarItems: StaffNormalLeftBarItems,
        /*普通公司侧边栏*/
        StaffLeftBarItems: StaffLeftBarItems,

        /* 绑定状态 */
        BindStatus: BindStatus,
        BindStatusFormat: BindStatusFormat,

        /* 验证状态 */
        AuthenticationStatus: AuthenticationStatus,

        /* 公司人员数量选项 */
        companyNumberOptions: companyNumberOptions,
        /* 公司行业选项 */
        companyIndustryOptions: companyIndustryOptions,
        /* 公司性质选项 */
        companyNatureOptions: companyNatureOptions,

        /* 设备管理 侧栏选项 */
        LocksLeftBarItems:LocksLeftBarItems,

        RentsLeftBarItems:RentsLeftBarItems,
        ApproveLeftBarItems:ApproveLeftBarItems,

        AccountLeftBarItems:AccountLeftBarItems,
        LockListTitle:LockListTitle,

    }

});